﻿using PolePositionMobile.Entities;
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

namespace PolePositionMobile
{
    /// <summary>
    /// A dialog called when the number of images is lower than the requirement
    /// </summary>
    public partial class frmInsufficientPhotosDialog : frmBase
    {
        //Created by: VMCoder
        //Creation date: -
        //Last updated by: VMCoder
        //Last update: 2008.04.10
        #region Private Members
        private EVisit m_Visit;
        #endregion
        #region Public Properties
        public EVisit Visit
        {
            get { return m_Visit; }
            set { m_Visit = value; }
        }
        #endregion
        public frmInsufficientPhotosDialog()
        {
            InitializeComponent();
        }
        private void frmInsufficientPhotosDialog_Load(object sender, EventArgs e)
        {
            #region Config form
            lblTitle.Text = "PPI | Insufficient Photos";
            lblLButtonText.Text = "OK";
            #endregion
            lblMessage.Text = "You have submitted " + m_Visit.Images.Length.ToString() + " photo(s) for this asset. Project settings require a minimum of 3 photo(s) for each asset. Please provide more images for this asset to comply with project settings.";
        }
        protected override void lblLButton_Click(object sender, EventArgs e)
        {
            ShowLoading();
            Application.DoEvents();
            frmPhotos _Form = new frmPhotos();
            _Form.Visit = m_Visit;
            _Form.Settings = this.Settings;
            _Form.Show();
            this.Hide();
        }
    }
}